<template>
    <div>
        这是test组件
        <ul>
            <li>item1</li>
            <li>item1</li>
            <li>item1</li>
            <li>item1</li>
        </ul>

        <router-link to="/shopList">去shopList组件</router-link>

        <el-button @click="toPath">回到shopList组件</el-button>
    </div>
</template>

<script>
export default {
    data(){
        return {}
    },
    methods:{
        toPath(){
            //this.$router.push({
                // path:'/shopList'
            // })

            this.$router.push({
                name:'shopList'
            })
        }
    }
}
</script>